<template>
	<view>
		<view class="top" id="top">
			<commonNavBar title="静态评分" :showSearch="false">
				<template v-slot:right  >
					<view @tap="userPreYear"><text class="right-btn">沿用上一年</text></view>
				</template>
			</commonNavBar>
			<view class="step">
				<view v-for="(tabs,index) in stepList" :key="index" @click="stepActive(index)">
					<view :class="{'active': tabIndex == index}">
						{{ tabs.step }}
					</view>
				</view>
			</view>
		</view>
		<view class="centre" style="margin-top: 200rpx;">
			<view class="content-container">
				<view class="addInspect" v-show="tabIndex == 0">
					<view class="map">
						<image src="@/static/img/mapActive.png" />
						<text @tap="companyDimension(riskData.lngLat)"
							v-text="isLocationPoint(riskData.lngLat) ? '主体已标注':'主体未标注，请进行主体标注【点击开始主体标注】'"></text>
					</view>
					<view class="content">
						<view class="one">
							<view class="title">
								<view class="left">监管单位信息</view>
							</view>
							<view class="box">
								<view class="text">
									<view class="topicFlex">监管单位：</view>
									<text>{{ riskData.deptName }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">检查时间：</view>
									<text>{{ riskData.checkTime }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">执法人员1：</view>
									<uni-data-select :value="riskData.scorePerson1Id" :localdata="userList"
										  @change="selectSupervise($event,1)"
										:clear="false" :placeholder="'请选择执法人员'"></uni-data-select>
								</view>
								<view class="text">
									<view class="topicFlex" ><text style="color: red;">*</text>执法人员2：</view>
									<uni-data-select :value="riskData.scorePerson2Id" :localdata="userList"
										   @change="selectSupervise($event,2)"
										:clear="false" :placeholder="'请选择执法人员'"></uni-data-select>
								</view>
							</view>
						</view>
						<view class="two">
							<view class="title">
								<view class="left">生产经营主体信息</view>
							</view>
							<view class="box">
								<view class="text">
									<view class="topicFlex">主体名称：</view>
									<text>{{ riskData.companyName }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">经营地址：</view>
									<view
										style="width: 560rpx;text-overflow: ellipsis; white-space: nowrap;overflow: hidden;">
										<text>{{ riskData.companyAddress }}</text>
									</view>
								</view>
								<view class="text">
									<view class="topicFlex">主体类别：</view>
									<text>{{ riskData.companyType }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">{{ riskData.supProcess == 'spxs' || riskData.supProcess == 'cyfw' ? '经营范围' : '品种明细' }}：</view>
									<text>{{ riskData.businessScope }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">负责人：</view>
									<text>{{ riskData.concat }}</text>
								</view>
								<view class="text">
									<view class="topicFlex">联系方式：</view>
									<input type="number" class="text"   placeholder="请输入联系方式" 	v-model="riskData.concatPhone" style="padding-left:0px;margin-left: 0px;padding-top: 8px;"   />
								</view>
								<view class="text">
									<view class="topicFlex">联系人：</view>
									<input type="text" class="text"   placeholder="请输入联系人" 	v-model="riskData.contact" style="padding-left:0px;margin-left: 0px;padding-top: 8px;"   />
								</view>
								<view class="text">
									<view class="topicFlex">法人：</view>
									<input type="text" class="text"   placeholder="请输入法人" 	v-model="riskData.legalPerson" style="padding-left:0px;margin-left: 0px;padding-top: 8px;"   />
								</view> 

							</view>
						</view>

					</view>
				</view>
				<view class="addInspectContent" v-show="tabIndex == 1">
					<view class="positioning">
						<image src="@/static/img/mapActiveTwo.png" />
						<text @tap="companyDimension(riskData.lngLat)"
							v-text="isLocationPoint(riskData.lngLat) ? '主体已标注':'主体未标注，请进行主体标注【点击开始主体标注】'"></text>
					</view>
					<view class="box">
						<view class="manage_status_box">
							<text
								class="manage_status_title">{{riskData.supProcess == 'spsc' || riskData.supProcess == 'tssc' ?'生产':'经营'}}状态：</text>
							<radio-group v-model="riskData.manageStatus" @change="manageStatusChange"
								class="custom-radio-group"  >
								<label class="labelRadio" :class="{'yes': (riskData.manageStatus == '0')}   ">
									<radio value="0" :checked="riskData.manageStatus == '0'"
										  />
									正常
								</label>
								<label class="labelRadio" :class="{ 'no': (riskData.manageStatus == '1') }   ">
									<radio value="1" :checked="riskData.manageStatus == '1'"
										  />
									异常
								</label>
							</radio-group>
						</view>
						<view class="abnormal" v-show="riskData.manageStatus == '1' ">
							<view class="block">
								<view class="text">
									<view class="topicFlex">异常核查时间：</view>
									<uni-datetime-picker type="date" :clear-icon="false" v-model="riskData.abnormalTime"
										  @change="abnormalTimeClick" />
								</view>
								<view class="text">
									<view class="topicFlex">异常原因：</view>
									<uni-data-select :value="riskData.abnormalReason" :localdata="riskData.abnormalReasonType"
										  :clear="false"
										@change="abnormalReasonChange"></uni-data-select>
								</view>
								<view class="text">
									<view class="topicFlex">异常情况核查记录：</view>
									<input type="text" placeholder="必填项" v-model="riskData.abnormalCheckRecord"
										  placeholder-class="placeholder-class" />
								</view>
							</view>
						</view>
						<!-- <view class="three" v-show="riskData.manageStatus != '1'">
							<view class="box"> -->
								<!-- <view class="text facadePhoto">
										门脸照片：
										<image  style="width:100px;height:100px;border:1px solid #e8e8e8;border-radius: 7px;"  @tap="facadePhotoControl(riskData.companyPic)"  
										:src="riskData.companyPic == undefined ? '/static/img/upload.png': baseUrl + riskData.companyPic "   ></image>
									</view> -->
								<!-- <view class="text facadePhoto">
									告知页&nbsp;&nbsp;&nbsp;&nbsp;：
									<image style="width:100px;height:100px;border:1px solid #e8e8e8;border-radius: 7px;"
										@tap="showNoticeControl(riskData.informUrl)"
										:src="riskData.informUrl == undefined ? '/static/img/upload.png': baseUrl + riskData.informUrl ">
									</image>
								</view>
							</view>
						</view> -->
						<view class="dt" v-show="riskData.manageStatus == '0' ">
							<view class="h1">静态评分内容</view>
							<view class="dd" style="padding-bottom: 50px;" v-for="(data, index) in riskData.projectList"
								:key="index">
								<view class="block">
									<view class="li">
										<view class="titles">
											<view class="text">
												{{index+1}}.{{ data.projectName }}({{data.score == undefined ? 0 : data.score}}分)
											</view>
											<text class="righttop-title">
												{{data.scoreValue == undefined ? 0 : data.scoreValue}} 分
											</text>
										</view>
										<!-- <view class="titles">
											<view class="dec-text">
												备注：{{ data.remarks }}
											</view>
										</view> -->
										<view class="optionList" v-if="data.scoreList.length > 0">
											<uni-data-select v-model="data.scoreValue" :localdata="data.scoreMapList"
												:disabled="lastYear"
												@change="selectScore($event,index)" :clear="false"
												v-if="data.isMultiple === '0'">
											</uni-data-select>

											<rudon-multiSelector welcome="请选择" :is_using_slot="false"
												:is_using_icon="false" :localdata="data.scoreMapList"
												@change="problemDescriptionChange($event,index)" :clear="false"
												selectBy="text" v-else>
											</rudon-multiSelector>
										</view>
										<view class="optionList" v-else>
											<!-- <text style="color: #71706d;font-size: 18rpx; text-align: center;">无选择项</text> -->
											<input v-model="data.scoreValue" class=" option score-input" type="number" 
												@input="checkInput($event,index)" />
										</view>
									</view>
								</view>
							</view>
						</view>
					</view>
					<view class="dec-text-titles">
						<view class="dec-text">
							备注：{{ riskData.remarks }}
						</view>
					</view>
					<!--  静态总分 -->
					<view class="bottom-tab" :style="{ bottom: '110rpx'}">
						<uni-collapse style="background-color: #026DC6;">
							<uni-collapse-item :title="'静态评分总分值'+(riskData.totalScore)+'分'" :show-animation="true"
								:titleBgColor="'#026DC6'" :titleColor="'#ffffff'">
								<view class="content">
									<text class="text">
										1.食品销售者同时经营食用农产品的按照食品销售者实施风险分级管理。
										2.评分总和为40分，评分项因实际情况缺项的，对应的得分为“0”。
										3.含进货查验、食品贮存、食品内部运输、食品陈列展售场所的面积总和。
										4.单品数不含制作过程中各类食品原料和半成品数量，指独立展售食品的品种数。
										5.表中畜禽水产品不包括进口食用农产品。
										6.特殊食品是指婴幼儿配方乳粉、婴幼儿配方食品、特殊食品以及特殊医学用途食品等
									</text>
								</view>
							</uni-collapse-item>
						</uni-collapse>
					</view>
				</view>
				<view class="fixed" >
					<button class="determine" @tap="savePopup('2')">提交</button> 
				</view>
			</view>
		</view>
		<!-- 基础信息-告知单 -->
		<uni-popup ref="noticeForm" type="bottom">
			<view class="noticeFormPopupContent">
				<view class="title">电子告知单</view>
				<view class="h1Title">食品销售经营日常监督检查</view>
				<view class="h2Ttitle">告知页</view>
				<view class="box">
					<view class="div">
						<view class="titles">被检查单位：</view>
						<text class="value">{{riskData.companyName}}</text>
					</view>
					<view class="div">
						<view class="titles">地址：</view>
						<text class="value">{{riskData.companyAddress}}</text>
					</view>
					<view class="div">
						<view class="titles">
							检查人员1
							<!-- <text>执法证件编号：</text> -->
						</view>
						<uni-data-select :value="riskData.scorePerson1Id"
							@change="selectNotificationCheckPerson1($event)" :localdata="userList" :clear="false"
							:placeholder="'请选择检查人员'" :disabled="true"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">
							检查人员2
							<!-- <text>执法证件编号：</text> -->
						</view>
						<uni-data-select :value="riskData.scorePerson2Id"
							@change="selectNotificationCheckPerson2($event)" :localdata="userList" :disabled="true"
							:clear="false" :placeholder="'请选择检查人员'"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">检查时间：</view>
						<text class="value">{{riskData.checkTime }}</text>
					</view>
					<view class="div">
						<view class="titles">检查地点：</view>
						<text class="value">{{ riskData.companyAddress }}</text>
					</view>
					<view class="div">
						<view class="titles">告知事项：</view>
						<view class="textarea"> {{notificationText | notificationFilter(this)}} </view>
					</view>
					<view class="div">
						<view class="titles">
							问：你（单位）
							<text>是否申请回避？</text>
						</view>
						<uni-data-select v-model="applyForAvoidanceValue" :localdata="applyForAvoidanceList"
							:clear="false" :placeholder="'请选择是否回避'"></uni-data-select>
					</view>
					<view class="div">
						<view class="titles">被检查单位签字：</view>
						<view class="signature" @tap="signature(1)">点击签字</view>
						<image class="sig-image" v-if="riskData.sigOnePic != ''" :src="riskData.sigOnePic"></image>
					</view>
					<view class="div">
						<view class="titles">检查人员1签字：</view>
						<view class="signature" @tap="signature(2)">点击签字</view>
						<image class="sig-image" v-if="riskData.sigTwoPic != ''" :src="riskData.sigTwoPic"></image>
					</view>
					<view class="div">
						<view class="titles">检查人员2签字：</view>
						<view class="signature" @tap="signature(3)">点击签字</view>
						<image class="sig-image" v-if="riskData.sigThreePic != ''" :src="riskData.sigThreePic"></image>
					</view>
				</view>
				<view class="button">
					<button class="determine" @tap="noticeFormDetermine">保存</button>
					<button class="cancellation" @tap="noticeFormCancellation">预览</button>
				</view>
			</view>
		</uni-popup>
		<!-- 显示告知单预览 -->
		<uni-popup ref="popupNotificationTwo" type="bottom">
			<view ref="popupNotificationContent" class="popupContent"
				style="padding: 14px;padding-bottom: 50px;overflow-y: auto;">
				<view id="scrrent-page">
					<view style="text-align: center;font-size: 23px;font-weight: 700;">食品经营销售日常监督检查要点表</view>
					<view style="text-align: center;font-size: 18px;font-weight: 700;">告知页</view>
					<view style="border: 1px solid #dadada;padding: 10px;margin-top: 20px;">
						<view class="item-text">被检查单位：{{riskData.companyName}}</view>
						<view class="item-text">地址：{{riskData.companyAddress}}</view>
						<view class="item-text">检查人员1：{{riskData.scorePerson1Id | userNameFilter(this) }}</view>
						<view class="item-text">检查人员2：{{riskData.scorePerson2Id | userNameFilter(this)}}</view>
						<view class="item-text">检查时间：{{riskData.checkTime }}</view>
						<view class="item-text">告知事项：{{notificationText | notificationFilter(this)}}
						</view>
						<view class="item-text"> 问：你（单位）是否申请回避？</view>
						<view class="item-text"> {{applyForAvoidanceList[applyForAvoidanceValue.value]}} </view>
						<view class="item-text">
							检查单位签字: <image class="sig-image" :src="riskData.sigOnePic"></image>
						</view>
						<view class="item-text">
							检查人员1签字: <image class="sig-image" :src="riskData.sigTwoPic"></image>
						</view>
						<view class="item-text">
							检查人员2签字: <image class="sig-image" :src="riskData.sigThreePic"></image>
						</view>
					</view>
				</view>
				<view class="button">
					<button class="determine" @click="printNotification">确认</button>
					<button class="cancellation" @click="closeNotification">关闭</button>
				</view>
			</view>
		</uni-popup>
		<!-- 提交弹窗 -->
		<uni-popup ref="popupTwo" type="bottom">
			<view class="popupContent">
				<view class="title">确定</view>
				<view class="box">
					提交当前评分？
				</view>
				<view class="button" style="padding-bottom:20px;">
					<button class="determine" @click="finalSave" :disabled="finalSaveDisabled">确认</button>
					<button class="cancellation" @click="closeConfirm">返回</button>
				</view>
			</view>
		</uni-popup>
		<screenshot ref="screenshot" :screenId="'scrrent-page'" @renderFinish="getScreenImg"></screenshot>
	</view>
</template>

<script>
import longscreen from '@/components/screenShot.vue'
import commonNavBar from '@/components/CommonNavBar.vue';

export default {
		components: {
			commonNavBar,
			'screenshot': longscreen
		},
		data() {
			return {
				tabIndex: 0,
				baseUrl: uni.$baseUrl,
				stepList: [{
					step: '基础信息',
					active: true
				}, {
					step: '评分内容',
					active: false
				}],
				abnormalCauseList: [{
					value: "不在注册地经营",
					text: "不在注册地经营"
				}],
				applyForAvoidanceValue: 0,
				applyForAvoidanceList: [{
						value: 0,
						text: "否"
					},
					{
						value: 1,
						text: "是"
					},
				],
				navHeight: 0,
				notificationText: uni.$notificationText,
				companyId: "",
				userList: [],
				riskData: {
					totalScore: 0,
					sigOnePic: '',
					sigTwoPic: '',
					sigThreePic: '',
					checkId: '',
					lngLat: '',
					deptName: '',
					scoreList: []
				}, //页面数据
				lastYear: false,
				finalSaveDisabled: false
			}
		},
		filters: {
			notificationFilter(value, that) {
				return value.replace(/\${([^}]+)}/g, that.riskData.deptName);
			},
			userNameFilter(value, that) {
				for (var i = 0; i < that.userList.length; i++) {
					if (that.userList[i].id == value) {
						return that.userList[i].text;
					}
				}
				return '';
			}
		},
		onLoad(options) {
			this.companyId = options.companyId
		},
		onReady() {

			//this.$refs.noticeForm.open('bottom')
			const that = this;
			const query = uni.createSelectorQuery().in(this);
			query.select('#top').boundingClientRect(data => {
				that.navHeight = data.height + 30
			}).exec();
			//获取页面信息
			this.getUserList();
			this.initData();
		},
		methods: {
			stepActive(index) {
				this.tabIndex = index;
			},
			async initData() {
				uni.showLoading({
					title: '正在加载信息',
					mask: true
				})
				const res = await uni.$api.getStaticContentInfo({
					companyId: this.companyId
				});
				if (res.data.code == '1') {
					uni.showToast({
						title: '获取信息失败,请稍后再试',
						icon: 'error'
					})
					return;
				}
				uni.hideLoading();
				this.riskData = res.data.data;
				console.log('this.riskData', this.riskData)
				if (this.riskData.projectList.length == 0) {
					uni.showModal({
						title: '提示',
						content: '没有可用评分内容',
						showCancel: false
					})
					return;
				}
			},
			async getUserList() {
				//获取执法人员列表
				//获取监管人员信息
				const useRes = await uni.$api.getSupervisePersonList();
				this.userList = useRes.data.data;
			},
			abnormalReasonChange(e) {
				this.$set(this.riskData, "abnormalReason", e)
			},
			selectSupervise(e, index) {
				//选择执法人员
				if (index == 1) {
					this.$set(this.riskData, "scorePerson1Id", e)
				} else {
					this.$set(this.riskData, "scorePerson2Id", e)
				}

			},
			manageStatusChange(e) {
				// 选择经营状态 
				this.$set(this.riskData, "manageStatus", e.target.value);
			},
			selectScore(e, index) {
				// 重置总分
				this.riskData.totalScore = 0;

				// 遍历项目列表，更新总分
				for (var i = 0; i < this.riskData.projectList.length; i++) {
					if (this.riskData.projectList[i].scoreValue !== undefined) {
						this.riskData.totalScore += parseFloat(this.riskData.projectList[i].scoreValue);
					}
				}

				// 仅在当前索引的项目中遍历scoreList，并更新isSelect属性
				for (var n = 0; n < this.riskData.projectList[index].scoreList.length; n++) {
					if (this.riskData.projectList[index].scoreList[n].value == e) {
						this.$set(this.riskData.projectList[index].scoreList[n], "isSelect", "1");
					} else {
						// 确保其他选项不被选中
						this.$set(this.riskData.projectList[index].scoreList[n], "isSelect", "0");
					}
				}
			},
			problemDescriptionChange(e, index) {
				const updatedData = e.map(item => {
					item.isSelect = item.is_selected ? "1" : "0";
					return item;
				});

				var d = this.riskData.projectList[index];
				this.$set(d, "scoreList", updatedData);

				const selectedItems = updatedData.filter(item => item.is_selected);

				const totalScore = selectedItems.reduce((accumulator, item) => {
					const scoreValue = parseFloat(item.scoreValue);
					if (!isNaN(scoreValue)) {
						return accumulator + scoreValue;
					}
					return accumulator;
				}, 0);

				this.$set(d, "scoreValue", totalScore);

				this.riskData.totalScore = 0;

				for (var i = 0; i < this.riskData.projectList.length; i++) {
					const scoreValue = parseFloat(this.riskData.projectList[i].scoreValue);
					if (!isNaN(scoreValue)) {
						this.riskData.totalScore += scoreValue;
					}
				}
			},
			facadePhotoControl(filePath) {
				const that = this; 
				if (filePath == undefined || filePath == 'undefined') {
					that.facadePhotoOpen();
					return;
				}
				uni.showActionSheet({
					itemList: ['查看文件', '重新上传'],
					title: '选择操作',
					success: function(res) {
						if (res.tapIndex == 0) {
							Vue.prototype.$previewImage(filePath); 
						} else if (res.tapIndex == 1) {
							that.facadePhotoOpen();
						}
					}
				})

			},
			facadePhotoOpen() {
				//门头照上传
				const that = this;
				uni.chooseImage({
					count: 1,
					// sourceType:['camera'],
					success: (e) => {
						uni.uploadFile({
							url: '/riskManager/uploadStaticCheckFile',
							filePath: e.tempFilePaths[0],
							header: {
								'content-Type': 'multipart/form-data',
							},
							name: 'file',
							formData: {
								checkId: that.riskData.checkId
							},
							success: (res) => {
								const result = JSON.parse(res.data);
								if (result.code === 0) {
									uni.showToast({
										title: '上传成功',
										icon: 'error'
									})
									that.$set(that.riskData, "companyPic", result.data.comanyPic);
								} else {
									uni.showToast({
										title: '上传失败',
										icon: 'error'
									})
								}
							},
							fail: () => {
								uni.showToast({
									title: '上传失败',
									icon: 'error'
								})
							}
						})
					},
					fail: () => {
						uni.showToast({
							icon: 'error',
							title: '图片选择错误'
						})
					}
				})

			},
			showNoticeControl(filePath) {
				const that = this; 
				if (filePath == undefined || filePath == 'undefined') {
					that.noticeFormOpen();
					return;
				}
				uni.showActionSheet({
					itemList: ['查看文件', '重新生成'],
					title: '选择操作',
					success: function(res) {
						if (res.tapIndex == 0) {
							Vue.prototype.$previewImage(filePath);
						} else if (res.tapIndex == 1) {
							that.noticeFormOpen();
						}
					}
				})
			},
			noticeFormOpen() {
				const that = this;
				uni.showActionSheet({
					itemList: ['生成告知单', '选择文件'],
					title: '选择操作',
					success: function(res) {
						if (res.tapIndex == 0) {
							that.$refs.noticeForm.open('bottom');
						} else if (res.tapIndex == 1) {
							uni.chooseImage({
								count: 1,
								sourceType:['album', 'camera'],
								success: (e) => {
									plus.io.resolveLocalFileSystemURL(e.tempFilePaths[0], function(
										entry) {
										//参数path:图片相对路径
										entry.file(function(file) {
											var fileReader = new plus.io
												.FileReader()
											fileReader.readAsDataURL(file)
											fileReader.onloadend = function(evt) {
												// let base64 = evt.target.result.split(",")[1]
												// console.log('获取到base64',evt.target.result);
												that.saveNotice(evt.target
													.result);
											}
										})
									})
								},
								fail: () => {
									uni.showToast({
										icon: 'error',
										title: '图片选择错误'
									})
								}
							})
						}
					}
				})
			},
			async signature(index) {
				//告知单签名
				const that = this;
				//签名
				uni.navigateTo({
					url: '/pages/signature/signature',
					events: {
						updateSign(data) {
							if (index == 1) {
								that.$set(that.riskData, "sigOnePic", data);
							} else if (index == 2) {
								that.$set(that.riskData, "sigTwoPic", data);
							} else if (index == 3) {
								that.$set(that.riskData, "sigThreePic", data);
							}
						}
					}
				})
			},
			// 基础信息告知页保存
			noticeFormDetermine() {
				if (this.riskData.sigOnePic == '' || this.riskData.sigOnePic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}

				if (this.riskData.sigTwoPic == '' || this.riskData.sigTwoPic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}

				if (this.riskData.sigThreePic == '' || this.riskData.sigThreePic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}

				this.$refs.popupNotificationTwo.open();
			},
			// 基础信息告知页预览打印
			noticeFormCancellation() {
				if (this.riskData.sigOnePic == '' || this.riskData.sigOnePic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}

				if (this.riskData.sigTwoPic == '' || this.riskData.sigTwoPic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}

				if (this.riskData.sigThreePic == '' || this.riskData.sigThreePic == undefined) {
					uni.showToast({
						title: '请完成签名',
						icon: 'none'
					})
					return;
				}
				this.$refs.popupNotificationTwo.open();
			},
			printNotification() {
				const that = this;
				uni.showLoading({
					title: '正在生成',
					mask: true
				})

				//将告知单存储页面生成图片保存到相册并上传到服务器
				this.$refs.screenshot.startScreen();
			},
			getScreenImg(res) {
				//生成告知单图片的
				const that = this;
				//根据传输过来的id 和选中的图片传到后台直接保存 
				uni.saveImageToPhotosAlbum({
					filePath: res.posterPath,
					success: function() {
						uni.hideLoading();
						uni.showLoading({
							title: '正在保存告知单信息',
							mask: true
						})
						plus.io.resolveLocalFileSystemURL(res.posterPath, function(entry) {
							//参数path:图片相对路径
							entry.file(function(file) {
								var fileReader = new plus.io.FileReader()
								fileReader.readAsDataURL(file)
								fileReader.onloadend = function(evt) {
									// let base64 = evt.target.result.split(",")[1]
									// console.log('获取到base64',evt.target.result);
									that.saveNotice(evt.target.result);
								}
							})
						})
					},
					fail: () => {
						uni.hideLoading();
						uni.showToast({
							icon: 'error',
							title: '请给与相册权限，否则告知单将无法存贮在手机中'
						})
					}
				})

			},
			async saveNotice(noticePic) {
				//保存告知单到服务器
				const that = this;
				const res = await uni.$api.saveRiskStaticCheckInform({
					checkId: that.riskData.checkId,
					informFile: noticePic
				});

				uni.hideLoading();
				if (res.data.code == '0') {
					that.$set(that.riskData, "informUrl", res.data.data);
					uni.showModal({
						content: '保存成功,告知单图片已自动存储到相册',
						title: '提示',
						showCancel: false,
						success: function() {
							that.$refs.popupNotificationTwo.close();
							that.$refs.noticeForm.close();
						}
					})
				} else {
					uni.showToast({
						icon: 'success',
						title: '告知单存储失败'
					})
				}
			},
			// 关闭告知页预览打印
			closeNotification() {
				this.$refs.popupNotificationTwo.close()
			},
			//保存数据
			savePopup(type) {
				this.saveType = type
				if (type == '1') {
					//临时保存 
					this.finalSave('temporarily');
					return;
				}
				if (type != '1') {
					console.log('type', type)
					//表单填写验证
					console.log('this.riskData.scorePerson1Id', this.riskData.scorePerson1Id)
					if (this.riskData.scorePerson1Id == '' || this.riskData.scorePerson1Id == undefined) {
						uni.showToast({
							title: '请选择执法人员',
							icon: 'none'
						})
						return;
					}
					if (this.riskData.scorePerson2Id == '' || this.riskData.scorePerson2Id == undefined) {
						uni.showToast({
							title: '请选择执法人员',
							icon: 'none'
						})
						return;
					}
					if (this.riskData.manageStatus == '' || this.riskData.manageStatus == undefined) {
						uni.showToast({
							title: '请选择经营状态',
							icon: 'none'
						})
						return;
					}
					if (this.riskData.manageStatus == '1') {
						//异常情况
						if (this.riskData.abnormalReason == '' || this.riskData.abnormalReason == undefined) {
							uni.showToast({
								title: '请选择异常原因',
								icon: 'none'
							})
							return;
						}
						if (this.riskData.abnormalCheckRecord == '' || this.riskData.abnormalCheckRecord == undefined) {
							uni.showToast({
								title: '请填写异常情况核查记录',
								icon: 'none'
							})
							return;
						}
					}

					console.log('riskData.manageStatus', this.riskData.manageStatus)
					if(!this.lastYear) {
						if(this.riskData.manageStatus != '1') {
							for (var i = 0; i < this.riskData.projectList.length; i++) {
								// if (this.riskData.projectList[i].scoreValue == '0' || this.riskData.projectList[i].scoreValue ==
								// 	'' || this.riskData.projectList[i].scoreValue == undefined)
								if (typeof this.riskData.projectList[i].scoreValue === 'undefined') {
									uni.showToast({
										title: '存在没有填写的评分',
										icon: 'none'
									})
									return;
								}
							}
						}
					}
				}
				this.$refs.popupTwo.open('bottom')
			},
			async finalSave(type) {
				//最终保存
				uni.showLoading({
					title: '正在提交',
					mask: true
				})
				this.finalSaveDisabled = true;
				const res = await uni.$api.saveRiskStaticCheck({
					"temporarily": (type != 'temporarily') ? '0' : '1',
					"riskData": JSON.stringify(this.riskData)
				}) 
				uni.hideLoading();
				if (res.data.code != '0') {
					uni.showModal({
						icon: 'error',
						content: res.data.message,
						showCancel: false
					})
					return;
				}
				uni.showToast({
					icon: 'success',
					title: '保存成功'
				})
				const  that = this;
				if (type != 'temporarily') {
					const eventChannel = that.getOpenerEventChannel();
					eventChannel.emit('reloadList');
					uni.navigateBack() 
				}
			},
			async userPreYear(type) {
				const that = this;
				//判断是否有上一年的评分记录
				const res = await uni.$api.getRiskStaticLastYearCheck({
					"companyId": this.companyId
				})
				if (res.data.data == null) {
					uni.showModal({
						title: '提示',
						content: '没有上一年的评分记录',
						showCancel: false
					})
					return;
				}else {
					that.lastYear = true;
					console.log('this.lastYear', this.lastYear)
					that.riskData = res.data.data;
				}
				return
				//沿用上一年
				if (this.riskData.scorePerson1Id == '' || this.riskData.scorePerson1Id == undefined) {
					uni.showToast({
						title: '请选择评分人',
						icon: 'none'
					})
					return;
				}
				if (this.riskData.scorePerson2Id == '' || this.riskData.scorePerson2Id == undefined) {
					uni.showToast({
						title: '请选择评分人',
						icon: 'none'
					})
					return;
				}

				uni.showModal({
					content: '确定要沿用上一年的评分么',
					success: (mres) => {
						if (mres.confirm) {
							that.saveLastYear();
						}
					}
				})
				
			},
			async saveLastYear() {
				const res = await uni.$api.saveRiskStaticLastYearCheck({
					"checkId": this.riskData.checkId,
					scorePerson1Id: this.riskData.scorePerson1Id,
					scorePerson2Id: this.riskData.scorePerson2Id
				})
				if (res.data.code != '0') {
					uni.showModal({
						icon: 'error',
						content: res.data.message,
						showCancel: false
					})
					return;
				}
				uni.showToast({
					icon: 'success',
					title: '保存成功'
				})
				if (type != 'temporarily') {
					const eventChannel = this.getOpenerEventChannel();
					eventChannel.emit('reloadList');
					uni.navigateBack()
				}
			},
			closeConfirm() {
				this.$refs.popupTwo.close()
			},
			//认证主体是否已经标注
			isLocationPoint(lng_lat) {
				if (lng_lat != undefined && lng_lat != '' && lng_lat != 'undefined') {
					return true;
				} else {
					return false;
				}
			},
			companyDimension(lng_lat) { 
				//进入到企业标注
				const that = this;
				if (lng_lat != undefined && lng_lat != '' && lng_lat != 'undefined') {
					return;
				}
				uni.navigateTo({
					url: '/pages/dimension/dimension?companyId=' + this.companyId + '&lng_lat=' + lng_lat,
					events: {
						// 为指定事件添加一个监听器，获取被打开页面传送到当前页面的数据
						updateLngLat: function(data) {
						    that.$set(that.riskData,"lngLat",data.lng_lat);
						}
					},
				})
			},
			showImage(url) {
				Vue.prototype.$previewImage(url);  
			},
			// 异常核查时间
			abnormalTimeClick(e) {
				this.$set(this.riskData, 'abnormalTime', e);
			},
			checkInput(e, index) {
				//判断输入内容是否正确
				const that = this;
				let inter = this.riskData.projectList[index].inter;
				if (inter != null) {
					clearTimeout(inter);
				}
				inter = setTimeout(function() {
					that.$set(that.riskData.projectList[index], "scoreValue", parseFloat(e.target.value == '' ? 0 :
						e.target.value))
					if (parseFloat(e.target.value) > parseFloat(that.riskData.projectList[index].score)) {
						that.$set(that.riskData.projectList[index], "scoreValue", that.riskData.projectList[index]
							.score)
					}
					that.riskData.totalScore = 0;
					for (var i = 0; i < that.riskData.projectList.length; i++) {
						if (that.riskData.projectList[i].scoreValue != undefined) {
							that.riskData.totalScore = parseFloat(that.riskData.totalScore) + parseFloat(that
								.riskData.projectList[i].scoreValue)
						}
					}
				}, 500)
				that.$set(that.riskData.projectList[index], "inter", inter);
			}
		}
	}
</script>

<style lang="scss">
	.top {
		position: fixed;
		top: 0px;
		z-index: 9999;
	}

	.step {
		display: flex;
		justify-content: space-around;
		height: 80rpx;
		width: 750rpx;
		line-height: 80rpx;
		background: #F9F9F9;

		view {
			position: relative;
			font-size: 25rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: #999999;

			&.active {
				color: #0552A9;

				&::before {
					display: block;
					content: "";
					position: absolute;
					left: 50%;
					bottom: 0%;
					transform: translate(-50%, 0%);
					width: 100rpx;
					height: 5rpx;
					background: #0552A9;
				}
			}
		}
	}


	.addInspect {
		padding: 0 0 110rpx 0;

		.map {
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/map.png') no-repeat center center;
			background-size: cover;
			font-size: 23rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #002E63;
			margin: 0 auto;
			display: flex;
			align-items: center;

			image {
				width: 22rpx;
				height: 26rpx;
				margin: 0 11rpx 0 53rpx;
			}
		}

		.content {

			.text {
				font-size: 19rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				margin: 0 auto 13rpx;
				min-height: 48rpx;
				line-height: 68rpx;
				line-height: 1.2;
				display: flex;
				align-items: center;
				padding: 10rpx 50rpx;
				background: #fff;
				justify-content: flex-start;
				flex: 1;
				white-space: nowrap;

				text {
					color: #666666;
					width: 460rpx;
					white-space: normal;
				}

				.uni-stat__select {
					width: 460rpx;

					/deep/.uni-select {
						border: none;
						font-size: 19rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
					}

					/deep/.uni-select__input-placeholder {
						font-size: 19rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
					}
					
					/deep/.uni-select__selector-item {
						font-size: 19rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #333333;
					}
				}

				.uni-date {
					width: 460rpx;

					/deep/.uni-date-editor--x {
						border: none;
					}
				}

				.custom-radio-group {
					display: flex;

					.labelRadio {
						display: flex;
						margin: 0 10rpx;
						align-items: center;
					}

					/deep/.uni-radio-input {
						width: 20rpx;
						height: 20rpx;
						border: 1rpx solid #979797;
					}

					.yes {

						/deep/.uni-radio-input {
							background: #07D276 !important;
							border-color: #07D276 !important;

							&::before {
								background: #07D276;
								border-radius: 50%;
								font-size: 16rpx;
							}
						}
					}

					.no {

						/deep/.uni-radio-input {
							background: #FF1F1F !important;
							border-color: #FF1F1F !important;
							position: relative;
							transform: rotate(45deg);

							&::before {
								content: "";
								position: absolute;
								top: 50%;
								left: 50%;
								background-color: #fff;
								width: 2rpx;
								height: 60%;
								transform: translate(-50%, -50%);
							}

							&::after {
								content: "";
								position: absolute;
								top: 50%;
								left: 50%;
								background-color: #fff;
								width: 60%;
								height: 2rpx;
								transform: translate(-50%, -50%);
							}
						}
					}
				}

				uni-navigator {
					display: flex;
					align-items: center;
					color: #0552A9;
				}

				&:nth-child(even) {
					background: #F9F9F9;
				}
				
				.topicFlex {
					display: flex;
					justify-content: flex-end;
					width: 16%;
				}
				
				text {
					width: 80%;
					line-height: 1.6;
				}
			}

			.two {

				.box {

					.text {

						.input-container {

							input {
								font-size: 19rpx;
							}
						}
					}
				}

				.abnormal {

					.block {

						.text {

							.div {
								display: flex;
								flex-direction: column;
								line-height: initial;
							}
						}
					}
				}
			}

			.three {

				.box {

					.text {

						view {
							color: #1e4de6
						}
					}

					.facadePhoto {
						height: 150px;

						image {
							width: 100rpx;
							height: 100rpx;
						}
					}
				}
			}
		}
	}

	.centre {
		overflow-x: hidden;

		.content-container {

			.title {
				height: 73rpx;
				line-height: 73rpx;
				background: #E1EAF4;
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				text-indent: 50rpx;
				font-size: 24rpx;
				font-family: PingFangSC-Medium, PingFang SC;
				font-weight: 500;
				color: #002B5B;
			}
		}
	}

	.addInspectContent {
		padding: 0 0 110rpx 0;

		.content {
			padding: 10px;

			.text {
				font-size: 25rpx;
				color: #9f9f9f;

			}
		}

		.positioning {
			padding: 0 17.5rpx;
			display: flex;
			align-items: center;
			height: 56rpx;
			line-height: 56rpx;
			background: #33B97C;
			box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
			border-radius: 28rpx;
			font-size: 23rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			margin: 14rpx auto;

			image {
				width: 22rpx;
				height: 26rpx;
				margin: 0 11rpx 0 53rpx;
			}
		}

		.box {
			padding: 0 17.5rpx;

			.dt {
				background: #FFFFFF;
				box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
				border-radius: 15rpx;
				padding: 23rpx 28rpx;

				.h1 {
					font-size: 24rpx;
					font-family: PingFangSC-Medium, PingFang SC;
					font-weight: 500;
					color: #0552A9;
					padding: 0 0 22rpx 0;
					border-bottom: 2rpx solid #CECECE;
				}

				.div {
					display: flex;
					margin: 21rpx auto 0;

					.left {
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #3A3A3A;
					}

					.right {
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: #686868;

						text {
							color: #DC0000;
						}

						input {
							font-size: 20rpx;
							font-family: PingFangSC-Regular, PingFang SC;
							font-weight: 400;
							color: #999999;
							width: 400rpx;
							text-indent: 10rpx;
						}

						.placeholder-class {
							color: #999999;
						}
					}

					&:last-child {
						align-items: center;
					}

					.custom-radio-group {
						display: flex;
						font-size: 20rpx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;

						.labelRadio {
							display: flex;
							margin: 0 10rpx;
							align-items: center;
						}

						/deep/.uni-radio-input {
							width: 20rpx;
							height: 20rpx;
							border: 1rpx solid #979797;
						}

						.yes {

							/deep/.uni-radio-input {
								background: #07D276 !important;
								border-color: #07D276 !important;

								&::before {
									background: #07D276;
									border-radius: 50%;
									font-size: 16rpx;
								}
							}
						}

						.no {

							/deep/.uni-radio-input {
								background: #FF1F1F !important;
								border-color: #FF1F1F !important;
								position: relative;
								transform: rotate(45deg);

								&::before {
									content: "";
									position: absolute;
									top: 50%;
									left: 50%;
									background-color: #fff;
									width: 2rpx;
									height: 60%;
									transform: translate(-50%, -50%);
								}

								&::after {
									content: "";
									position: absolute;
									top: 50%;
									left: 50%;
									background-color: #fff;
									width: 60%;
									height: 2rpx;
									transform: translate(-50%, -50%);
								}
							}
						}
					}
				}
			}

			.dd {

				.h1 {
					font-size: 20rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					margin: 10rpx auto;
					text-indent: 26rpx;
				}

				.block {
					background: #FFFFFF;
					padding: 23rpx 26rpx;
					border-bottom: 1px solid #e8e8e8;

					.li {

						.titles {
							font-size: 20rpx;
							font-family: PingFangSC-Medium, PingFang SC;
							font-weight: 500;
							color: #353535;
							position: relative;
							display: flex;
							display: flex;
							justify-content: space-between;

							text {
								margin: 0 6rpx 0 0;
							}

							.dec-text {
								margin: 0 6rpx 0 0;
								color: #a6a6a6;
							}

							&.red {

								text {
									color: #EF0000;
								}
							}

							.text {
								width: 76%;
							}

							.guide {
								position: absolute;
								top: 0;
								right: 0rpx;
								color: #026DC6;
								display: flex;
								align-items: center;

								image {
									width: 22rpx;
									height: 22rpx;
									margin: 0 6rpx 0 0;
								}

								.triangle {
									width: 0;
									height: 0;
									border-top: 8rpx solid transparent;
									border-bottom: 8rpx solid transparent;
									border-left: 10rpx solid #026DC6;
									position: absolute;
									top: 50%;
									right: -20rpx;
									transform: translate(-50%, -50%);
								}
							}
							
							.righttop-title {
								padding: 5px 8px;
								background-color: #026DC6;
								color: #ffffff;
								font-size: 16rpx;
								text-align: center;
								line-height: 20rpx;
								// width: 50px;
								// height: 20px;
							}
						}

						.optionList {
							display: flex;
							flex-direction: column;
							margin: 10px auto 0;
							align-items: center;

							/deep/.uni-select {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
								text-align: left;
							}
							
							/deep/.uni-select__input-placeholder {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
							}
							
							/deep/.uni-select__selector-item {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
								padding: 5px 10px !important;
								text-align: left !important;
								line-height: 1.6 !important;
							}
							
							/deep/.uni-select__input-box {
								white-space: nowrap;
								overflow: hidden;
								text-overflow: ellipsis;
								max-width: 100%;
							}
							
							/deep/.rudon-component__select {
								border: 1px solid #e5e5e5;
								border-radius: 4px;
								padding: 5px;
							}
							
							/deep/.rudon-select__input-box {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
							}
							
							/deep/.rudon-select__selector-item {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
								padding: 5px 0 !important;
							}
							
							/deep/.uni-icons {
								font-size: 19rpx !important;
							}

							/deep/.score-input {
								font-size: 19rpx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: #333333;
							}

							.list {
								display: flex;

								.option {
									padding: 12rpx 30rpx;
									border: 2rpx solid #C3C3C3;
									border-radius: 5rpx 0 0 5rpx;
									font-size: 18rpx;
									font-family: PingFangSC-Regular, PingFang SC;
									font-weight: 400;
									color: #666666;

									&:nth-child(2) {
										border-left: none;
										// border-right: none;
										border-radius: 0;
									}

									&:last-child {
										border-radius: 0 5rpx 5rpx 0;
										border-left: 0;
									}

									&.active {
										background: #E9F2FF;
										color: #0552A9;
									}
								}
							}

							.case {
								width: 650rpx;

								.h2 {
									font-size: 16rpx;
									font-family: PingFangSC-Medium, PingFang SC;
									font-weight: 500;
									color: #353535;
									margin: 20rpx 0 6rpx 0;
								}

								input {
									margin: 20rpx auto;
									border: 2rpx solid #e5e5e5;
									// border: 2rpx solid red;
									border-radius: 6rpx;
									text-indent: 10rpx;
									font-size: 18rpx;
									padding: 16rpx 0;

									&.inspect {
										border: 2rpx solid yellow;
									}
								}

								.placeholder-class {
									color: red;
								}

								.placeholder-class-inspect {
									color: yellow;
								}
							}
						}

						&+.li {
							margin: 20rpx auto 0;

							.title {

								// text {
								// 	color: #353535;
								// }
							}
						}
					}
				}
			}
		}
	}

	.dec-text-titles {
		font-size: 20rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #353535;
		position: relative;
		display: flex;
		padding: 30px 17px 100px;
	
		text {
			margin: 0 6rpx 0 0;
		}
	
		.dec-text {
			margin: 0 6rpx 0 0;
			color: #a6a6a6;
		}
	}

	.bottom-tab {
		position: fixed;
		bottom: 110rpx;
		width: 750rpx;

	}

	.uni-collapse-item__title-wrap {
		border-radius: 14px 14px 0px 0px;
	}

	.uni-collapse-item__title-box {
		text-align: center;
	}

	.uni-collapse-item__title-text {
		text-align: center;
	}

	.fixed {
		position: fixed;
		left: 0;
		bottom: 0;
		height: 92rpx;
		background: #fff;
		padding: 0 95rpx 24rpx 95rpx;
		margin: 0 auto;
		display: flex;
		align-items: center;
		width: calc(100% - 190rpx);

		button {
			width: 269rpx;
			height: 55rpx;
			line-height: 55rpx;
			background: #0552A9;
			border-radius: 10rpx;
			font-size: 20rpx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;

			&.determine {
				color: #fff;
			}

			&.cancellation {
				display: none;
				background: none;
				border: 1rpx solid #979797;
				color: #979797;
			}
		}
	}

	.noticeFormPopupContent {
		border-radius: 20rpx 20rpx 0 0;
		background-color: #ffffff;

		.title {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/popupTitle.png') no-repeat center center;
			background-size: cover;
			font-size: 25rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			// text-indent: 45rpx;
			text-align: center;
		}

		.h1Title {
			font-size: 26rpx;
			margin: 20rpx auto 0;
			text-align: center;
		}

		.h2Ttitle {
			font-size: 30rpx;
			text-align: center;
		}

		.signature {
			width: 100px;
		}

		.box {
			padding: 45rpx 30rpx;
			height: 400px;
			overflow-x: hidden;

			.div {
				border-top: 2rpx solid #D6D6D6;
				border-left: 2rpx solid #D6D6D6;
				border-right: 2rpx solid #D6D6D6;
				line-height: initial;
				height: initial;
				min-height: 82rpx;
				position: relative;
				display: flex;
				align-items: center;
				justify-content: flex-start;
				font-size: 21rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #333333;
				border-bottom: 2rpx solid #D6D6D6;

				&::before {
					content: "";
					display: block;
					width: 2rpx;
					height: 100%;
					background: #D6D6D6;
					position: absolute;
					top: 50%;
					left: 229rpx;
					transform: translate(-50%, -50%);
				}

				.titles {
					width: 229rpx;
					line-height: 1.2;
					height: 100%;
					display: flex;
					flex-direction: column;
					justify-content: center;
					margin: 0 20rpx 0 0;
					border-right: 0;
					padding-left: 10px;
				}

				.textarea {
					width: 50%;
					padding: 10rpx 0;
				}

				input {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
				}

				.value {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					width: 460rpx;
					text-indent: 20rpx;
					padding-left: 10px;
				}

				.placeholder-class {
					color: #999999;
				}

				.uni-stat__select {
					width: 460rpx;

					/deep/.uni-select {
						border: none;
					}
				}

				.uni-date {
					width: 460rpx;

					/deep/.uni-date-editor--x {
						border: none;
					}
				}

				&+.div {
					border-top: none;
				}
			}
		}

		.button {
			margin: 28rpx auto 0;
			display: flex;
			justify-content: space-around;
			align-items: center;
			padding-bottom: 20px;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.popupContent,
	.popupContentTwo {
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0 0;

		.title {
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			background: url('../../static/img/popupTitle.png') no-repeat center center;
			background-size: cover;
			font-size: 25rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #FFFFFF;
			// text-indent: 45rpx;
			text-align: center;
		}

		.box {
			text-align: center;
			margin: 50rpx auto;
		}

		.button {
			margin: 58rpx auto 0;
			display: flex;
			justify-content: space-around;
			align-items: center;

			button {
				width: 269rpx;
				height: 55rpx;
				line-height: 55rpx;
				background: #0552A9;
				border-radius: 10rpx;
				font-size: 20rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;

				&.determine {
					color: #fff;
				}

				&.cancellation {
					background: none;
					border: 1rpx solid #979797;
					color: #979797;
				}
			}
		}
	}

	.sig-image {
		width: 100px;
		height: 50px;
		margin-left: 20px;
	}

	.inform-image {
		width: 100px;
		height: 100px;
		margin-left: 10px;
		margin-right: 10px;
	}

	.right-btn {
		color: #ffffff;
		font-size: 24rpx;
		border-bottom: 2rpx solid #fff;
		white-space: nowrap;
	}

	.score-input {
		border: 1px solid #e5e5e5;
		height: 35px;
		border-radius: 5px;
		padding: 0px 10px;
		width: 570rpx;
	}

	.manage_status_box {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
		border-radius: 15rpx;
		padding: 23rpx 28rpx;
		margin-bottom: 20rpx;

	}

	// .custom-radio-group {
	// 	display: flex;

	// 	.labelRadio {
	// 		display: flex;
	// 		margin: 0 10rpx;
	// 		align-items: center;
	// 	}

	// 	/deep/.uni-radio-input {
	// 		width: 20rpx;
	// 		height: 20rpx;
	// 		border: 1rpx solid #979797;
	// 	}

	// 	.yes {

	// 		/deep/.uni-radio-input {
	// 			background: #07D276 !important;
	// 			border-color: #07D276 !important;

	// 			&::before {
	// 				background: #07D276;
	// 				border-radius: 50%;
	// 				font-size: 16rpx;
	// 			}
	// 		}
	// 	}

	// 	.no {

	// 		/deep/.uni-radio-input {
	// 			background: #FF1F1F !important;
	// 			border-color: #FF1F1F !important;
	// 			position: relative;
	// 			transform: rotate(45deg);

	// 			&::before {
	// 				content: "";
	// 				position: absolute;
	// 				top: 50%;
	// 				left: 50%;
	// 				background-color: #fff;
	// 				width: 2rpx;
	// 				height: 60%;
	// 				transform: translate(-50%, -50%);
	// 			}

	// 			&::after {
	// 				content: "";
	// 				position: absolute;
	// 				top: 50%;
	// 				left: 50%;
	// 				background-color: #fff;
	// 				width: 60%;
	// 				height: 2rpx;
	// 				transform: translate(-50%, -50%);
	// 			}
	// 		}
	// 	}
	// }
	
	.manage_status_title {
		font-size: 26rpx;
	}
	
	.custom-radio-group {
		display: flex;
		font-size: 26rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
						
		.labelRadio {
			display: flex;
			margin: 0 10rpx;
			align-items: center;
			
			/deep/radio {
				display: none;
			}
			
			&::before {
				content: '';
				width: 20rpx;
				height: 20rpx;
				line-height: 20rpx !important;
				text-align: center;
				border: 1rpx solid #979797;
				border-radius: 50%;
				font: normal normal normal 14px / 1 uni;
				font-size: 20rpx;
				color: #fff;
				margin: 0 4rpx 0 0;
			}
			
			&.yes::before {
				content: "\EA08";
				background-color: #07D276;
				border-color: #07D276;
			}
			
			&.no::before {
				content: "\00D7";
				background-color: #FF1F1F;
				border-color: #FF1F1F;
				line-height: 18rpx !important;
			}
		}
	}

	.abnormal {
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
		border-radius: 15rpx;
		padding: 23rpx 28rpx;
		margin-bottom: 20rpx;


		.block {
			.text {
				display: flex;
				flex-direction: row;
				justify-items: flex-start;
				align-items: center;
				padding: 23rpx 0rpx;

				.div {
					display: flex;
					flex-direction: column;
					line-height: initial;
				}
				
				.topicFlex {
					display: flex;
					justify-content: flex-start;
					width: 30%;
					font-size: 21rpx;
				}
				
				/deep/.uni-date-editor--x {
					height: auto;
				}
				
				/deep/.uni-date__x-input {
					height: auto;
					line-height: initial;
					font-size: 21rpx;
					padding: 5px 0;
				}
				
				/deep/.uni-icons {
					font-size: 21rpx !important;
				}
				
				/deep/.uni-select {
					padding: 2px 5px;
					height: auto;
				}
				
				/deep/.uni-select__input-box {
					height: auto;
				}
				
				/deep/.uni-select__selector {
					padding: 0;
				}
				
				/deep/.uni-select__selector-item {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
					padding: 5px 10px !important;
					text-align: left !important;
				}
				
				/deep/.uni-select__selector-empty {
					font-size: 21rpx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
				}
				
				/deep/.uni-select__input-text {
					font-size: 21rpx;
				}
			
				/deep/.uni-input-wrapper {
					font-size: 21rpx;
				}
			}
		}
	}

	.three {
		background: #FFFFFF;
		box-shadow: 0rpx 0rpx 29rpx 0rpx rgba(0, 0, 0, 0.05);
		border-radius: 15rpx;
		padding: 23rpx 28rpx;
		margin-bottom: 20rpx;

		.box {

			.text {
				display: flex;
				flex-direction: row;
				align-items: flex-start;
				justify-content: flex-start;

				view {
					color: #1e4de6
				}
			}

			.facadePhoto {
				height: 150px;

				image {
					width: 100rpx;
					height: 100rpx;
				}
			}
		}
	}
</style>